package com.ruoyi.web.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.mapper.SectionMapper;
import com.ruoyi.web.domain.Section;
import com.ruoyi.web.service.ISectionService;

/**
 * 板块Service业务层处理
 *
 * @author jiwei
 * @date 2024-05-17
 */
@Service
public class SectionServiceImpl extends ServiceImpl<SectionMapper, Section> implements ISectionService {
    @Autowired
    private SectionMapper sectionMapper;

    /**
     * 查询板块
     *
     * @param id 板块主键
     * @return 板块
     */
    @Override
    public Section selectSectionById(Long id) {
        return sectionMapper.selectSectionById(id);
    }

    /**
     * 查询板块列表
     *
     * @param section 板块
     * @return 板块
     */
    @Override
    public List<Section> selectSectionList(Section section) {
        return sectionMapper.selectSectionList(section);
    }

    /**
     * 新增板块
     *
     * @param section 板块
     * @return 结果
     */
    @Override
    public int insertSection(Section section) {
            return sectionMapper.insertSection(section);
    }

    /**
     * 修改板块
     *
     * @param section 板块
     * @return 结果
     */
    @Override
    public int updateSection(Section section) {
        return sectionMapper.updateSection(section);
    }

    /**
     * 批量删除板块
     *
     * @param ids 需要删除的板块主键
     * @return 结果
     */
    @Override
    public int deleteSectionByIds(Long[] ids) {
        return sectionMapper.deleteSectionByIds(ids);
    }

    /**
     * 删除板块信息
     *
     * @param id 板块主键
     * @return 结果
     */
    @Override
    public int deleteSectionById(Long id) {
        return sectionMapper.deleteSectionById(id);
    }
}
